package com.sisqorap;

public class TimeTools {
	public static String millisToTimeString(long milliseconds){
		StringBuilder sb = new StringBuilder();
        double hours = Math.floor((milliseconds/(1000*60*60)));
        double minutes = Math.floor((milliseconds-(hours*60*60*1000))/(1000*60));
        double seconds = Math.floor((milliseconds-(hours*60*60*1000)-(minutes*1000*60))/(1000));
        if(hours > 0){
        	sb.append((int)hours + " hours, ");	                	
        }
        if(minutes > 0){
        	sb.append((int)minutes + " minutes, ");
        }
        sb.append((int)seconds  + " seconds");
        return sb.toString();
	}
}